1. Field of the Invention
The disclosure relates generally to management methods and systems for storage units, and, more particularly to management methods and systems adapted to non-volatile memory that manage physical blocks of the storage unit in various classifications.
2. Description of the Related Art
Non-volatile memory, like Flash memory, is widely used nowadays and it is characterized that the unit for read/write is a page, and the unit for erase is a block, and the data must be erased before write. The characteristic makes it difficult to manage the read and write commands with Logic Block Address (LBA) from the host or the applications and to translate the logic addresses into physical addresses to access the physical block of the non-volatile memory. Therefore, a translation layer is always used between the file system of the host and the non-volatile memory to manage the read and write commands from the host and to access data in the memory. In conventional storage management for a non-volatile memory, data is accessed and addressed using a page mapping mode, or a block mapping mode.
In the page mapping mode, data in the storage unit is stored in a unit of page, and has a corresponding page mapping table. In the page mapping table, the logic page number is an index, and an address of a physical page is the table entry (item content). When a storage system using the page mapping mode handles read and write commands, data pages can be located by directly querying and updating the page mapping table. In the block mapping mode, data in the storage unit is stored in a unit of block, and has a corresponding block mapping table. In the block mapping table, the logic block number is an index, and an address of a physical block is the table entry. When a storage system using the block mapping mode handles read and write commands, data pages can be located by directly querying and updating the block mapping table.
Recently, with the development of IC manufacturing technology, the page/block size has been substantially increased. Further, respective pages in each block of a high capacity storage unit, such as a NAND flash memory, cannot be randomly written, but must be written in sequence. Additionally, in the NAND flash memory, the unit for read/write is a page, and the unit for erase is a block, and data must be erased before written. Therefore, when a storage system using the block mapping mode handles a write command, a block must be first allocated, so that the requested page could be written to the allocated block. Then, other pages in the logic block which the requested page belongs to must be copied to the allocated block, and the original data in the allocated block must be erased first. Thus, write efficiency is lowered when the block size is increased, especially for those requested pages comprising hot data, which is frequently accessed by the HOST. In the page mapping mode, the data distribution is complex. When no free block can be used, the procedure of data merging for obtaining a new empty block is complicated.
Therefore, some storage management systems employ a mix mapping mode integrating the block mapping mode and the page mapping mode. In these systems, the storage unit comprises respective areas corresponding to the block mapping mode and the page mapping mode, and the use between the respective areas must be switched by the data merge procedure. Although the storage management system having the mix mapping mode can store data in a more flexible manner, in practice, however, several unutilized physical pages still exist in the physical blocks corresponding to the block mapping mode and the page mapping mode of the storage unit, such that the data distribution in the storage unit becomes complex and complicated. Similarly, the data merging also increases system loads, and decreases system efficiency.